<%@page import="com.crm.entity.Clientdet"%>
<%@page import="com.crm.beans.SearchVO,com.crm.entity.Opportunity,com.crm.entity.SupplyOrder,com.crm.entity.Quotation,com.crm.beans.EnqSummary"%>
<%@page language="java" import="java.sql.*,java.util.*"%>
<%
	List<SearchVO> lopp =(List<SearchVO>)request.getAttribute("opportunity");
	List<SearchVO> lquot =(List<SearchVO>)request.getAttribute("quotation");
	List<SearchVO> lpo =(List<SearchVO>)request.getAttribute("po");
	List<SearchVO> lvquote =(List<SearchVO>)request.getAttribute("vendorquote");
	List<SearchVO> linvoice =(List<SearchVO>)request.getAttribute("invoice");
	List<SearchVO> loffPart =(List<SearchVO>)request.getAttribute("offPart");
%>
<link href="<%=application.getContextPath()%>/css/css-crm.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/datatable.css"/>
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/jquery-ui-1.8.17.custom.css"/>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.6.min.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<script type="text/javascript" language="javascript" src="<%=application.getContextPath()%>/js/jquery.dataTables.nightly.js"></script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#partsTable').dataTable();
		$('#quoteTable').dataTable();
		$('#poTable').dataTable();
		$('#vqTable').dataTable();
		$('#invoiceTable').dataTable();
	} );
</script>
<div class="result_msg">
BY RFQ
</div>
<div class="boxIFS">
<div>
        <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB" id="partsTable">
        <thead>
          <tr>
            <td width="138" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Enquiry Number</td>
            <td width="140" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Customer Name </td>
            <td width="162" align="center" valign="middle" background="images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Quantity</td>
            <td width="186" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Date</td>
          </tr>
          </thead>
          <tbody>
             <%
              if(lopp!=null){
            	  System.out.println("the size of the pr list is "+lopp.size());
	      	for(int i=0;i<lopp.size();i++){
	      	%>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF"><a  class="linkclass" href="#" > <span style="color: red;"><%=lopp.get(i).getEnquiryNo()%></span></a> </td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lopp.get(i).getCustomerName() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lopp.get(i).getQuantity() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lopp.get(i).getDate() %></td>
          </tr>
          <%}
	      	}%>
	      	</tbody>
        
        </table>
        </div>
      </div>
      <div class="result_msg">
BY Quote
</div>
<div class="boxIFS">
<div>
        <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB" id="quoteTable">
        <thead>
          <tr>
            <td width="138" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Enquiry Number</td>
            <td width="140" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Customer Name </td>
            <td width="140" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Quote Price </td>
            <td width="162" align="center" valign="middle" background="images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Quantity</td>
            <td width="186" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Date</td>
          </tr>
          </thead>
          <tbody>
             <%
              if(lquot!=null){
            	  System.out.println("the size of the pr list is "+lquot.size());
	      	for(int i=0;i<lquot.size();i++){
	      	%>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF"><a  class="linkclass" href="#" > <span style="color: red;"><%=lquot.get(i).getEnquiryNo()%></span></a> </td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lquot.get(i).getCustomerName() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lquot.get(i).getQuotePrice() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lquot.get(i).getQuantity() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lquot.get(i).getDate() %></td>
          </tr>
          <%}
	      	}%>
	      	</tbody>
        
        </table>
        </div>
      </div>
      <div class="result_msg">
BY PO
</div>
<div class="boxIFS">
<div>
        <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB" id="poTable">
        <thead>
          <tr>
            <td width="138" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Enquiry Number</td>
            <td width="140" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Customer Name </td>
            <td width="140" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Order Price </td>
            <td width="162" align="center" valign="middle" background="images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Quantity</td>
            <td width="186" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Date</td>
          </tr>
          </thead>
          <tbody>
             <%
              if(lpo!=null){
            	  System.out.println("the size of the pr list is "+lpo.size());
	      	for(int i=0;i<lpo.size();i++){
	      	%>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF"><a  class="linkclass" href="#" > <span style="color: red;"><%=lpo.get(i).getEnquiryNo()%></span></a> </td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lpo.get(i).getCustomerName() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lpo.get(i).getVendorPrice()%></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lpo.get(i).getQuantity() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lpo.get(i).getDate() %></td>
          </tr>
          <%}
	      	}%>
	      	</tbody>
        
        </table>
        </div>
      </div>
      <div class="result_msg">
BY Vendor Quote
</div>
<div class="boxIFS">
<div>
        <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB" id="vqTable">
        <thead>
          <tr>
            <td width="138" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Enquiry Number</td>
            <td width="140" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Customer Name </td>
            <td width="140" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Vendor Price </td>
            <td width="162" align="center" valign="middle" background="images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Quantity</td>
            <td width="186" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Date</td>
          </tr>
          </thead>
          <tbody>
             <%
              if(lvquote!=null){
            	  System.out.println("the size of the pr list is "+lvquote.size());
	      	for(int i=0;i<lvquote.size();i++){
	      	%>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF"><a  class="linkclass" href="#" > <span style="color: red;"><%=lvquote.get(i).getEnquiryNo()%></span></a> </td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lvquote.get(i).getCustomerName() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lvquote.get(i).getVendorPrice()%></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lvquote.get(i).getQuantity() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=lvquote.get(i).getDate() %></td>
          </tr>
          <%}
	      	}%>
	      	</tbody>
        
        </table>
        </div>
      </div>
      <div class="result_msg">
BY Invoice
</div>
<div class="boxIFS">
<div>
        <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB" id="invoiceTable">
        <thead>
          <tr>
            <td width="138" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Enquiry Number</td>
            <td width="140" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Invoice Number </td>
            <td width="140" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Value</td>
            <td width="162" align="center" valign="middle" background="images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Quantity</td>
            <td width="186" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Date</td>
            <td width="186" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Customer</td>
          </tr>
          </thead>
          <tbody>
             <%
              if(linvoice!=null){
            	  System.out.println("the size of the pr list is "+linvoice.size());
	      	for(int i=0;i<linvoice.size();i++){
	      	%>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF"><a  class="linkclass" href="#" > <span style="color: red;"><%=linvoice.get(i).getEnquiryNo()%></span></a> </td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=linvoice.get(i).getInvoiceNo() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=linvoice.get(i).getVendorPrice()%></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=linvoice.get(i).getQuantity() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=linvoice.get(i).getDate() %></td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=linvoice.get(i).getCustomerName() %></td>
          </tr>
          <%}
	      	}%>
	      	</tbody>
        
        </table>
        </div>
      </div>
      <div class="result_msg">
BY Offering Part Number
</div>
<div class="boxIFS">
<div>
        <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB" id="invoiceTable">
        <thead>
          <tr>
            <td width="138" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">S.NO</td>
            <td width="138" align="center" valign="middle" background="images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Offering Part Number</td>
          </thead>
          <tbody>
             <%
              if(loffPart!=null){
            	  System.out.println("the size of the pr list is "+loffPart.size());
	      	for(int i=0;i<loffPart.size();i++){
	      	%>
            <td align="left" valign="top" bgcolor="#FFFFFF"><a  class="linkclass" href="#" > <span style="color: red;"><%=(i+1)%></span></a> </td>
            <td align="center" valign="top" bgcolor="#FFFFFF"><%=loffPart.get(i).getOfferingPartNo()%></td>
          <tr>
          </tr>
          <%}
	      	}%>
	      	</tbody>
        
        </table>
        </div>
      </div>
